import meson;

public var cnt:int = 0;

public function f():void {
  cnt++;
  btn.label = 'clicks: ' + cnt;
  mx.controls.Alert.show('xxx');
  btn.setStyle('color', '0xff0000');
  btn.setStyle('fillColors', ['0x00ff00', '0x0000ff']);

  bg.graphics.beginFill(0x000000);
  bg.graphics.moveTo(0, 0);
  bg.graphics.lineTo(board.width, board.height);
}

public function send():void {
  var s:String = input.text;
  //mx.controls.Alert.show(s, 'Title');
  input.text = '';
  if (board.text.length > 0) {
    board.text += '\n';
  }
  board.text += s;
  board.validateNow();
  board.verticalScrollPosition = board.textHeight;
}

public function testcall():void {
  result.text = meson.addrToIdent(host.text, Number(port.text));
}